﻿using System.Collections.ObjectModel;
using BalanceManagerApp.DataAccess;
using BalanceManagerApp.Model;

namespace BalanceManagerApp.ViewModel
{
    public class ItemsViewModel : WorkspaceViewModel
    {
        IItemRepository itemRepository;

        public ItemsViewModel()
        {
            
        }

        public ItemsViewModel(IItemRepository itemRepository)
        {
            this.itemRepository = itemRepository;
        }

        public IItemRepository ItemsRepository
        {
            get
            {
                if (this.itemRepository == null)
                    this.itemRepository = new ItemRepository();
                return itemRepository;
            }
            set
            {
                this.itemRepository = value;
            }
    }
    }
}
